Optimization of drug prescribing